#ifndef DBWORKER_H
#define DBWORKER_H

#include <QObject>
#include <QSqlDatabase>

class DBWorker : public QObject
{
    Q_OBJECT
public:
    explicit DBWorker(QObject *parent = 0);

    bool openDb(const QString& dbName);
    bool createDb(const QString& dbName);
    void closeCurrentDb();

    QSqlDatabase *workDB()  { return mWorkDB; }
    
private:
    QString mDbName;
    QSqlDatabase *mWorkDB;
    bool mIsDbLoaded;
signals:
    
public slots:
    
};

#endif // DBWORKER_H
